package info.brenstar.boxedin.sprites;

import org.newdawn.slick.Color;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.geom.Polygon;

import info.brenstar.boxedin.core.Sprite;
import info.brenstar.boxedin.core.Updated;

public class Arena extends Sprite implements Updated {
	
	private float width = 640f, height = 480f;
	
	public Arena() {
		super();
		this.collide = true;
	}
	
	@Override
	public void init() {
		Polygon p = new Polygon();
		p.setClosed(true);
		p.addPoint(0f, 0f);
		p.addPoint(width, 0f);
		p.addPoint(width, height);
		p.addPoint(0f, height);
		p.addPoint(0f, height-32f);
		p.addPoint(width-32f, height-32f);
		p.addPoint(width-32f, 32f);
		p.addPoint(32f, 32f);
		p.addPoint(32f, height-32f);
		p.addPoint(0f, height-32f);
		mask = p;
		
		mask.setX(64f);
		mask.setY(64f);
	}

	@Override
	public void unload() {
		// TODO Auto-generated method stub

	}

	@Override
	public void kill() {
		// TODO Auto-generated method stub

	}

	@Override
	public void update() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void render(Graphics g) {
		g.fill(mask);
		g.setColor(Color.blue);
		g.draw(mask);
	}

}
